#include <stdio.h>
#include <stdlib.h>
int cmp(void* e1, void* e2)
{
    return *(int*)e1 - *(int*)e2;
}

int distributeCandies(int* candyType, int candyTypeSize) {
    qsort(candyType, candyTypeSize, sizeof(int), cmp);
    int n = candyTypeSize / 2;
    int type = 1;
    for (int i = 1; i < candyTypeSize; i++)
    {
        if (candyType[i] != candyType[i - 1])
        {
            type++;
        }
    }
    if (type > n)
        return n;
    else
        return type;
}

int main()
{
	return 0;
}